package eleventh.StringBuffer类;

public class 字符串反转操作 {
    public static void main(String[] args) {
        StringBuffer sb = new StringBuffer();
        sb.append("一去二三里");
        System.out.println(sb);
        sb=sb.reverse();  //字符串反转 逆序方式输出
        System.out.println(sb);
    }
}
/*
D:\WorkSpaces\Java\jdk-21\bin\java.exe "-javaagent:D:\Software\IntelliJ IDEA\IntelliJ IDEA 2023.3.2\lib\idea_rt.jar=52264:D:\Software\IntelliJ IDEA\IntelliJ IDEA 2023.3.2\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath D:\WorkSpaces\JavaDevelopBase_start_329\out\production\JavaDevelopBase_start_329 eleventh.StringBuffer类.字符串反转操作
一去二三里
里三二去一

Process finished with exit code 0

 */